DevForce Help Reference
EntityQueryPager<T> Class
Members 


The query type
A pager which allows EntityQuery<T> results to be paged either synchronously or asynchronously.
Object Model
EntityQueryPager<T> ClassISortSelector Interface
Syntax
'Declaration
 
Public Class EntityQueryPager(Of T) 
   Inherits EntityQueryPager
'Usage
 
Dim instance As EntityQueryPager(Of T)
public class EntityQueryPager<T> : EntityQueryPager 
Type Parameters
T
The query type
Remarks
Use the EntityQueryPager to manage paging of query results. The query can return items of an entity or anonymous type. When creating the EntityQueryPager the baseQuery determines the selection criteria, and also indicates the QueryStrategy in effect and the EntityManager used.

The QueryStrategy of the baseQuery controls whether paging is managed over just the local cache (QueryStrategy.CacheOnly), just the database (QueryStrategy.DataSourceOnly), or both ( QueryStrategy.DataSourceThenCache). Merge semantics are determined by the baseQuery.QueryStrategy.MergeStrategy.

No query is executed until the first MoveTo method is called. You'll usually call MoveToFirstPage or MoveToFirstPageAsync to get things started. You can then move forward and backward through query results using the MoveToNextPage and MoveToPreviousPage methods or their asynchronous counterparts. As paging is performed a query is executed for the specific "page" of the overall query results using the appropriate "skip" and "take" LINQ operators. MoveToLastPage allows you to go directly to the final page of results. The PageIndex and CurrentPageResults are used to indicate the current page and its data. When using the asynchronous API, query results are also returned in the EntityQueryPager.PageChangedOperation<T,T2>.

The PageChanging and PageChanged events are fired for all syncrhonous and asynchronous "MoveTo" calls.

An IdeaBlade.Core.ISortSelector is required to provide for ordered, and orderly, paging. Ideally the sort selector should guarantee that no two records have the same sort position, however the pager will still work with 'nonunique' sorts but performance will be improved the more unique the sort.

If the baseQuery's EntityManager is cleared then this will trigger a Reset call within this instance.

Inheritance Hierarchy

System.Object
   IdeaBlade.EntityModel.EntityQueryPager
      IdeaBlade.EntityModel.EntityQueryPager<T>

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityQueryPager<T> Members
IdeaBlade.EntityModel Namespace

Send Feedback